Bar codes are currently in use in numerous applications, such as, for example, for identifying objects for purchase, where a bar code scanner and a decoder are provided at the checkout counters to read and decode the bar code.
Bar codes can be generally divided into two types of encoded formats; i.e., a binary encoded format and a delta encoded format. In the case of bar codes of the binary format type, the bars and spaces are specified to have only two different widths (i.e., wide or narrow). The bar code is read by a scanner which forms a digital signal representative of the bar code. The digital signal is provided to a decoder which decodes the bar code and outputs the decoded character string. For example, an example of a nearly ideal digital signal for an encoded "3" character in Code 39 format is a bar code where the widths of the various bars and spaces are measured as 40, 20, 39, 41, 21, 20, 19, 20 and 21 units in width, respectively. As can be appreciated, in this example, due to the clear differentiation between the widths of the narrow and wide elements, it is easy for a decoder to distinguish between the wide and narrow elements.
It is known that in practical applications, the digital signal representative of the bar code can be significantly distorted for many different reasons. For example, printing imperfections, ink spreading, curved printed surfaces, convolution errors due to laser spot size, etc., are illustrative of events which contribute to the distortion of the digital signal. In distorted digital signals, it becomes more difficult to differentiate between the wide and narrow elements.
A sample decoding algorithm for Code 39 characters is given on page 9 of the USS-39Uniform Symbology Specification (ANSI-BC1-1995) published by AIM USA, approved by American National Standards Institute, Inc. on Aug. 16, 1995, and is incorporated herein by reference.
Some currently known decoders process the bars and spaces separately so as to reduce the effects of printing imperfections. The known decoders test the ratio of the maximum and the minimum bar width within a character, and if the ratio is not greater than the predetermined value, the character is determined to be all narrow. If the ratio is greater than a predetermined value, the known decoders set a threshold for the bars and a separate threshold for the spaces.
Each bar and space of the character is then compared against the respective threshold, and based on the comparison, are determined to be either wide or narrow.
A further problem with the known decoders is that they occasionally misdecode distorted digital signals representative of bar codes (i.e., provides an incorrect decoded character). Generally, as attempts are made to have the decoders more aggressive (i.e., higher decoding rate), the rate of misdecoding increases.